package com.pos.service.impl;

import com.pos.dao.DishDAO;
import com.pos.pojo.Dish;
import com.pos.service.DishService;

import java.util.List;

public class DishServiceImpl implements DishService {
    DishDAO dishDAO;
    @Override
    public List<Dish> list() {
        List<Dish> dish = dishDAO.list();
        return dish;
    }
    public DishDAO getDishDAO(){
        return dishDAO;
    }
    public void setDishDAO(DishDAO dishDAO){
        this.dishDAO = dishDAO;
    }

    @Override
    public void add(Dish d) {
        dishDAO.add(d);
    }

    @Override
    public Dish get(int dish_id) {
        return dishDAO.get(dish_id);
    }

    @Override
    public void update(Dish d) {
        dishDAO.update(d);
    }

    @Override
    public void delete(Dish d) {
        dishDAO.delete(d);
    }
}
